<template>
  <div class="container">
    <div class="content">
      <div class="content-inner">
        <div class="banner">
          <h1>
            Our Trusted Gateway To <br />
            Seamless Connectivity And <br />
            IT Service Management.
          </h1>
        </div>
        <div class="login-right">
          <div class="logo">
            <div class="logo-text"><img src="@/assets/images/gss-logo.png" title="logo" /></div>
          </div>
          <div class="box">
            <LoginForm @login-success="loginSuccess" />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { useRouter } from 'vue-router';
  // import Footer from '@/components/footer/index.vue';
  // import LoginBanner from './components/banner.vue';
  import LoginForm from './components/login-form.vue';

  const router = useRouter();
  const loginSuccess = (result) => {
    router.push({ path: `/order/index` });
  };
</script>

<style lang="less" scoped>
  .container {
    display: flex;
    height: 100vh;
    background: #f5f5f5;
    .banner {
      width: 550px;
      background-color: transparent;
      background-image: linear-gradient(135deg, #ffdf73 0%, #ff8534 100%);
      flex-grow: 0;
      flex-shrink: 0;
      position: relative;
      text-align: left;
      overflow: hidden;
      border-radius: 30px 0 0 30px;
      h1 {
        color: #fff;
        padding: 50px 0 0 50px;
      }
    }

    .content {
      position: relative;
      display: flex;
      width: 1200px;
      margin: 40px auto;
      background: #fff;
      border-radius: 30px;
    }
    .content-inner {
      display: flex;
      .login-right {
        flex-grow: 1;
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    .footer {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 100%;
    }
  }
  .box {
    padding-left: 160px;
    height: 100%;
    position: relative;
  }
  .logo {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 10px;
    left: 10px;
    width: 60px;
    img {
      width: 100%;
    }
    &-text {
      margin-right: 4px;
      margin-left: 4px;
      color: var(--color-fill-1);
      font-size: 20px;
    }
  }
</style>

<style lang="less" scoped>
  // responsive
  @media (max-width: @screen-lg) {
    .container {
      .banner {
        width: 25%;
      }
    }
  }
</style>
